package person.FP;

public class DelayPerform {
    public void printLog(int level , String log){
        if(level ==1 ){
            System.out.println(log);
        }
    }
    public void printLog2(int level , HandleLog handler){
       if(1 == level ) {
           handler.handler();
       }
    }
    public static void main(String[] args) {
        DelayPerform dp = new DelayPerform();
        String s1 = "112";
        String s2 = "sdfsafads";
        String s3 = "adsfasfew";
//        dp.printLog(1,s1+s2+s3);
        dp.printLog2(0,()->{
            System.out.println(s1+s2+s3);
        });

    }

}
